Page({
  data:{
    url: 'https://www.litecoder.com/iframe.html',
    // url: 'http://www.litecoder.com/test.html',
    // url: 'https://shuiyunjian.litecoder.com/html/iframe.html',
    messageData: null
  },
  onMessage(e) {
    let { detail } = e
    this.setData({
      messageData: detail.data[detail.data.length - 1]
    })
  },
  onShareAppMessage(options) {
    let { webViewUrl } = options
    let { messageData } = this.data
    console.log('嵌套h5的url：', webViewUrl)
    console.log('嵌套h5传过来的参数：', messageData)
    wx.showModal({
      title: messageData
    })
  }
})